home *** CD-ROM | disk | FTP | other *** search
/ Aminet 38 / Aminet 38 (2000)(Schatztruhe)[!][Aug 2000].iso / PPaint / ColorType / Rexx / FlipFont.ctrx < prev    next >
Text File  |  1996-08-28  |  1KB  |  62 lines

  1. /* ColorType Amiga Rexx script - Copyright © 1996 Cloanto Italia srl */
  2.  
  3. /* $VER: FlipFont.ctrx 1.0 */
  4.  
  5. /**
  6.  This script flips ("mirrors") the images of all characters in the
  7.  font, in a way equivalent to the "Flip Font" menu item of the Personal Fonts
  8.  Maker 2 software.
  9.  
  10.  This command can be used in combination with the "Reverse Direction" command
  11.  to transform a left-to-right font into right-to-left, or vice versa. This
  12.  may be useful to process left-to-right font data for use in certain
  13.  non-Latin languages, for specific video applications, for use in systems
  14.  where the text has to be displayed through a reflective surface, for
  15.  printing text on foil (e.g. in combination with Cloanto's RevLin utility),
  16.  etc.
  17. */
  18.  
  19. IF ARG(1, EXISTS) THEN
  20.     PARSE ARG CTPORT
  21. ELSE
  22.     CTPORT = 'COLORTYPE'
  23.  
  24. IF ~SHOW('P', CTPORT) THEN DO
  25.     IF EXISTS('ColorType:ColorType') THEN DO
  26.         ADDRESS COMMAND 'Run >NIL: ColorType:ColorType'
  27.         DO 30 WHILE ~SHOW('P',CTPORT)
  28.              ADDRESS COMMAND 'Wait >NIL: 1 SEC'
  29.         END
  30.     END
  31.     ELSE DO
  32.         SAY "ColorType could not be loaded."
  33.         EXIT 10
  34.     END
  35. END
  36.  
  37. IF ~SHOW('P', CTPORT) THEN DO
  38.     SAY 'ColorType Rexx port could not be opened.'
  39.     EXIT 10
  40. END
  41.  
  42. ADDRESS VALUE CTPORT
  43. OPTIONS RESULTS
  44. OPTIONS FAILAT 10000
  45.  
  46.  
  47. LockGUI
  48. GetChar
  49. scnum = RESULT
  50.  
  51. SetChar FIRSTON
  52. IF RC = 0 THEN DO
  53.     DO FOREVER
  54.         FlipHoriz
  55.         SetChar NEXTON
  56.         IF RC ~= 0 THEN
  57.             LEAVE
  58.     END
  59.     SetChar scnum
  60. END
  61. UnlockGUI
  62.